package com.ftg.learn;

import com.ftg.learn.service.DeptService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration;
import org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration;
import org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.DispatcherServlet;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.annotation.Annotation;

/**
 * 主程序
 * <p>
 * SpringBootApplication : 表示当前类为springboot 的启动类，主入口类
 * 组合注解 :
 * 完成springboot 的自动配置功能
 * SpringBootConfiguration : 表示当前类为配置类Configuration 功能一样  Component    ，把当前类注入到容器里面
 * <p>
 * 开启自动化配置功能
 * EnableAutoConfiguration :
 * <p>
 * 组件扫描
 * ComponentScan(
 * excludeFilters = {@Filter(
 * type = FilterType.CUSTOM,
 * classes = {TypeExcludeFilter.class}
 * ), @Filter(
 * type = FilterType.CUSTOM,
 * classes = {AutoConfigurationExcludeFilter.class}
 * )}
 * )
 * <p>
 * <p>
 * 框架原始核心类(autoConfiguration 完成这些类的注入)
 * <p>
 * 开发人员自定义的 (@controller @Service @Mapper @Component)
 *
 * @author 布衣
 */
@SpringBootApplication(exclude = {ConfigurationPropertiesAutoConfiguration.class,
        LifecycleAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class,
        ApplicationAvailabilityAutoConfiguration.class, ProjectInfoAutoConfiguration.class})
public class Application {

    /**
     * 主线程 ： 自动调用spring的其它工程线程完成整体功能
     *
     * @param args
     */
    public static void main(String[] args) {
        //丁  :  反射 Class.forname("类地址")  类名.class 实例.getClass();
        // 反射可以获得类里面的信息 （属性和方法[构造方法 ]） （实例）
        SpringApplication.run(Application.class);
    }

}
